package com.jeesite.modules.fl.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.service.CrudService;
import com.jeesite.modules.fl.dao.ClinicUserDao;
import com.jeesite.modules.fl.entity. ClinicUser;

@Service
@Transactional(readOnly=true)
public class ClinicUserService extends CrudService< ClinicUserDao, ClinicUser>{
	
	/**
	 * 获取单条数据
	 * @param clinicUser
	 * @return
	 */
	@Override
	public  ClinicUser get( ClinicUser clinicUser) {
		 ClinicUser entity = super.get(clinicUser);
		return entity;
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param clinicUser
	 */
	@Override
	@Transactional(readOnly=false)
	public void save( ClinicUser clinicUser) {
		dao.delete(clinicUser);
		clinicUser.preInsert();
		dao.insert(clinicUser);
	}
	
	
}
